//
//  CustonNavView.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/6/6.
//

#import "CustonNavView.h"
#import "CommonUtil.h"

@interface CustonNavView()

@property (strong, nonatomic) UILabel * label1;


@end


@implementation CustonNavView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = RGB(255, 90, 117);
        [self addSubview:self.label1];
        [self addSubview:self.backBtn];
    }
    return self;
}

#pragma mark - lazy

-(UILabel *)label1{
    if (!_label1) {
        _label1 = [[UILabel alloc] initWithFrame:CGRectMake(0, kStatusBarHeight, SCREEN_WIDTH, kNavBarHeight)];
        _label1.text = @"活动中心";
        _label1.textAlignment = NSTextAlignmentCenter;
        _label1.textColor = [UIColor whiteColor];
        _label1.font = [UIFont boldSystemFontOfSize:AD(15)];
    }
    return _label1;
}
-(UIButton *)backBtn{
    if (!_backBtn) {
        _backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_backBtn setTitle:@"返回" forState:UIControlStateNormal];
        [_backBtn setImage:[UIImage imageNamed:@"icon_rule_back"] forState:UIControlStateNormal];
        [_backBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _backBtn.titleLabel.font = [UIFont systemFontOfSize:AD(14)];
        _backBtn.frame = CGRectMake(AD(15), kStatusBarHeight, AD(60), kNavBarHeight);
        _backBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -AD(5), 0, 0);
    }
    return _backBtn;
}


@end
